package com.lilanz.facepass.service.impl;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.lilanz.facepass.dao.LogMapper;
import com.lilanz.facepass.entity.log.Log;
import com.lilanz.facepass.service.ILogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, Log> implements ILogService {
    @Resource
    private LogMapper logMapper;


    @Override
    public int insertLog(Log log) {
        return logMapper.insert(log);
    }

    @Override
    public List<Map<String, Object>> selectLog(int id) {
        EntityWrapper<Log> logWrapper = new EntityWrapper<>();
        logWrapper.eq("id", id);
        return logMapper.selectMaps(logWrapper);
    }
}
